Program logic and equivalence in the presence of garbage collection

نویسندگان

  • Cristiano Calcagno
  • Peter W. O'Hearn
  • Richard Bornat
چکیده

It is generally thought that reasoning about programs in memory safe, garbage collected languages is much easier than in languages where the programmer has more explicit control over memory. Paradoxically, existing program logics are based on a low level view of storage that is sensitive to the presence or absence of unreachable cells, and Reynolds has pointed out that the Hoare triples derivable in these logics are even incompatible with garbage collection. We present a study of a small language whose operational semantics includes a rule for reclaiming garbage. Our main results include an analysis of propositions that are garbage insensitive, and full abstraction results connecting partial and total correctness to two natural notions of observational equivalence between programs.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

On Garbage and Program Logic

Garbage collection relieves the programmer of the burden of managing dynamically allocated memory, by providing an automatic way to reclaim unneeded storage. This eliminates or lessens program errors that arise from attempts to access disposed memory, and generally leads to simpler programs. One might therefore expect that reasoning about programs in garbage collected languages would be much ea...

متن کامل

Proof Nets, Garbage, and Computations

We study the problem of local and asynchronous computation in the context of multiplicative exponential linear logic (MELL) proof nets. The main novelty is in a complete set of rewriting rules for cut-elimination in presence of weakening (which requires garbage collection). The proposed reduction system is strongly normalizing and confluent. Abstract: We study the problem of local and asynchron...

متن کامل

Type-Preserving Flow Analysis and Interprocedural Unboxing (Extended Version)

Interprocedural flow analysis can be used to eliminate otherwise unnecessary heap allocated objects (unboxing), and in previous work we have shown how to do so while maintaining correctness with respect to the garbage collector. In this paper, we extend the notion of flow analysis to incorporate types, enabling analysis and optimization of typed programs. We apply this typed analysis to specify...

متن کامل

A Lambda-Calculus with letrec, case, constructors and non-determinism

A non-deterministic call-by-need lambda-calculus λndlr with case, constructors, letrec and a (non-deterministic) erratic choice, based on rewriting rules is investigated. A standard reduction is defined as a variant of left-most outermost reduction. The semantics is defined by contextual equivalence of expressions instead of using αβ(η)-equivalence. It is shown that several program transformati...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Theor. Comput. Sci.

دوره 298  شماره 

صفحات  -

تاریخ انتشار 2003